<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>杭州手机维修</title>
<!--     <script type="text/javascript" src="${CDN}/plugins/validate/jquery.min.js" charset="gb2312"></script> -->
    <script type="text/javascript" src="${CDN}/ui/repair/js/jquery.min.js" ></script>
    <script type="text/javascript" src="${CDN}/ui/repair/js/wfdq.js" charset="gb2312"></script>
    <script type="text/javascript" src="${CDN}/ui/repair/js/jquery.jcslider.js"></script>
    <script type="text/javascript" src="${CDN}/ui/repair/js/jquery.jcslider.min.js" ></script>
    <link href="${CDN}/ui/repair/css/animate.min.css" rel="stylesheet" type="text/css"/>
    <link href="${CDN}/ui/repair/css/public.css" rel="stylesheet" type="text/css"/>
    <link href="${CDN}/ui/repair/css/jcslider.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
	
        #wforder{width:500px;}
        #wforder form,.wforderl,.wftitle{border-color:#FF9733;}
		ul * {
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
}


.wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

ul {
    list-style: none;
    padding: 0;
}
		
    </style>
</head>
<body>
<div id="wforder">
    <form id="wfform" name="wfform" action="${CDN}/front/to_order/" method="post" onsubmit="return postcheck()" target="_parent">
        <input type="hidden" id="wfddll" name="wfddll" value=""/>
        <input type="hidden" id="wfddll" name="order_no" value="${order_no}"/>
        <input type="hidden" name="wfmun" value="1"/>
        <input type="hidden" name="repair_fees" value="NaN" id="repair_fees"/>
<!-- 		<div class="wftitle"> -->
			
<!-- 		</div> -->
		<ul class="jc-slider">
				<%for(item in bannerList){
				%>
				<li class="jc-animation">
               		<img src="${CDN}/upimg/${item.img_url}"/>
                </li>
                <%}%>
			</ul> 
        <div class="wftitle"><img src="/quote_repair/ui/repair/image/tita.gif"/></div>
        <div class="bdbox">
            <ul>
                <li>
                    <span class="bdl"><em>*</em>选择品牌</span>
                    <span class="bdr red">
                        <select name="brand_id" id="r_brand" onchange="change_p();" class="selecta">
							<option selected="selected" value="0">请选择</option>
							<%
							 for(item in brandList){
							%>
							<li class="jc-animation"[...]</li>
                            <option value="${item.r_brand_id}_${item.name}">${item.name}</option>
                            <%}%>
                        </select>
                    </span>
				</li>
                <li>
                    <span class="bdl"><em>*</em>选择型号</span>
                    <span class="bdr red">
                        <select name="model_id" id="r_model" class="selecta" id="change_pc" onchange="change_c()">
                            <option selected="selected" value="0">请选择</option>
                        </select>
                    </span>                
				</li>
				
				<li class="product">
                    <span class="bdl"><em>*</em>损坏原因</span>
					
                    <span class="bdr red" id="yuanyin">
                       无
                    </span>                
				</li>
				
				 <li><span class="bdl"><em>*</em>价格总和</span><span class="bdr" id="pr_zh">0</span></li>
				 
                <li><span class="bdl"><em>*</em>您的姓名</span><span class="bdr"><input type="text" name="wfname" class="txt kda"/></span></li>
                <li><span class="bdl"><em>*</em>手机号码</span><span class="bdr"><input type="text" name="mobile_no" class="txt kda"/></span></li>
                <li><span class="bdl"><em>*</em>所在地区</span><span class="bdr"><select name="wfprovince" class="selectb"><option value="">== 请选择省份 ==</option><option value="北京市">北京市</option><option value="天津市">天津市</option><option value="河北省">河北省</option><option value="山西省">山西省</option><option value="内蒙古自治区">内蒙古自治区</option><option value="辽宁省">辽宁省</option><option value="吉林省">吉林省</option><option value="黑龙江省">黑龙江省</option><option value="上海市">上海市</option><option value="江苏省">江苏省</option><option value="浙江省">浙江省</option><option value="安徽省">安徽省</option><option value="福建省">福建省</option><option value="江西省">江西省</option><option value="山东省">山东省</option><option value="河南省">河南省</option><option value="湖北省">湖北省</option><option value="湖南省">湖南省</option><option value="广东省">广东省</option><option value="广西壮族自治区">广西壮族自治区</option><option value="海南省">海南省</option><option value="重庆市">重庆市</option><option value="四川省">四川省</option><option value="贵州省">贵州省</option><option value="云南省">云南省</option><option value="西藏自治区">西藏自治区</option><option value="陕西省">陕西省</option><option value="甘肃省">甘肃省</option><option value="青海省">青海省</option><option value="宁夏回族自治区">宁夏回族自治区</option><option value="新疆维吾尔自治区">新疆维吾尔自治区</option><option value="香港特别行政区">香港特别行政区</option><option value="澳门特别行政区">澳门特别行政区</option><option value="台湾省">台湾省</option><option value="其它">其它</option></select><select name="wfcity" class="selectb"><option value="">== 请选择城市 ==</option></select><select name="wfarea" class="selectb"><option value="">== 维修站点 ==</option></select></span></li>
                <li>
                    <span class="bdl"><em>*</em>付款方式</span>
                    <span class="bdr">
                        <div class="payaa">
                            <input type="radio" checked="checked" name="pay_type" id="b1" value="货到付款" onclick="opay();return changeItem(0);" class="dxk"/><label for="b1">微信支付</label>
                            <input type="radio" name="pay_type" id="b2" value="支付宝支付" onclick="opay2();return changeItem(1);" class="dxk"/><label for="b2">支付宝在线付款</label>
                            <input type="radio" name="pay_type" id="b3" value="银行汇款" onclick="opay();return changeItem(2);" class="dxk"/><label for="b3">银行汇款</label>
                        </div>
                        <div id="paydiv0" class="paybb kda">
                            <p>温馨提示：请配置好微信支付接口</p>
                            <p>有任何疑问请拨打我们免费客服电话：400-800-8888</p>
                        </div>
                        <div id="paydiv1" class="paybb kda" style="display:none;">					
                            <p>温馨提示：请配置好支付宝接口</p>s
                            <p>全球领先的第三方支付平台，在线支付，安全可靠！</p>							
                        </div>
                        <div id="paydiv2" class="paybb kda" style="display:none;">
                            <p>请配置好银联接口</p>
                            <p>免费客服电话：400-800-8888</p>
                        </div>
                    </span>                </li>
                <li class="guest">
					<span class="bdl">留言</span>
					<span class="bdr">
					
						<textarea name="words_message" onfocus="if(value==&#39;请尽量在星期天送货，送货之前手机联系，谢谢！&#39;){value=&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;请尽量在星期天送货，送货之前手机联系，谢谢！&#39;}" class="guest kda">请尽量详细说明您手机损坏的原因，谢谢！</textarea>
					</span>
				</li>
                <li class="code"><span class="bdl"><em>*</em>验证码</span><span class="bdr"><input type="text" name="wfcode" class="txt txt2"/><img src="${CDN}/front/vcodeImg" alt="看不清，请点击刷新" title="看不清，请点击刷新" onclick="this.src=this.src+&#39;?&#39;"/></span></li>
                <li class="sub"><input type="submit" name="wfsubmit" value="" class="send"/></li>
            </ul>
        </div>
    </form>
</div>

<script type="text/javascript">
if("${error_info!}"!=""){
	alert("${error_info!}");
}

function postcheck(){
    if (document.wfform.wfname.value==""){
        alert('请填写姓名！');
        document.wfform.wfname.focus();
        return false;
    }
    var reg1 = /^[\u4e00-\u9fa5]{2,4}$/;
    if (!reg1.test(document.wfform.wfname.value)){
        alert('姓名格式不正确，请填写真实姓名！');
        document.wfform.wfname.focus();
        return false;
    }
    if (document.wfform.mobile_no.value==""){
        alert('请填写手机号码！');
        document.wfform.mobile_no.focus();
        return false;
    }
    var reg2 = /^1[3,4,5,8]\d{9}$/;
    if (!reg2.test(document.wfform.mobile_no.value)){
        alert('手机号码格式不正确，请填写正确的手机号码！');
        document.wfform.mobile_no.focus();
        return false;
    }
    if (document.wfform.wfprovince.value==""){s
        alert('请选择所在地区！');
        document.wfform.wfprovince.focus();
        return false;
    }
    if (document.wfform.wfaddress.value==""){
        alert('请填写详细地址！');
        document.wfform.wfaddress.focus();
        return false;
    }
    if (document.wfform.wfcode.value == "" || document.wfform.wfcode.value.length < 4){
        alert('请填写验证码！');
        document.wfform.wfcode.focus();
        return false;
    }	
}
new PCAS("wfprovince","wfcity","wfarea");

</script>
<script type="text/javascript" src="/quote_repair/ui/repair/js/wfsubb.js"></script>

<!-- <script type="text/javascript" src="/quote_repair/ui/repair/js/jquery.1.8.3.js"></script> -->

<script>



	
function change_p(){
	var cid=$("#r_brand").val();
	if(cid==0)return;
	$.get('${CDN}/front/getModelJson/'+cid,function(msg){
		
		var op = ' <option selected="selected" value="0">请选择</option>';
		for(var i in msg){
			op+='<option value="'+msg[i].r_model_id+'_'+msg[i].model+'">'+msg[i].model+'</option>';
		}
		console.log(op);
		$('#yuanyin').html('');
		$('#r_model').html(op);
	},'json');
}
var price =0;

function change_c(ob,id){

	var cid = $("#r_model").val();
	if(cid==0)return;
	$.get('${CDN}/front/getRepairJson/'+cid,function(msg){
		var code ='';
		
		for(var i in msg){
			code+= ' <input type="checkbox" name="repair_type_id" id="a'+i+'" value="'+msg[i].r_repair_type_id+'_'+msg[i].repair_type+'" data-pr="'+msg[i].charge+'" onchange="ppric(this);" onclick="pricea();" class="dxk" />';
			code+= ' <label for="a'+i+'">'+msg[i].repair_type+'  '+msg[i].charge+'元</label><br />';
		}
	//s	$('#pr_zh').html('0');
		$('#yuanyin').html(code);
	},'json');
}


function ppric(ob){

	var oo = $(ob);
	var ls_p = oo.attr('data-pr');
		ls_p = parseInt(ls_p);
		

	if(oo.is(':checked')){
		
		price += ls_p;
	}
	else{
		price -= ls_p;
	}
	
	
	$('#repair_fees').val(price);
	$('#pr_zh').html(price);
	
}

$(function(){
	var brandList='${brandList}';
	$('.jc-slider').jcSlider({
        animationIn: 'bounceInRight',
        animationOut: 'bounceOutLeft',
        stopOnHover: false
    });
});


</script>
</body></html>